package com.gmail.liulijuan.UI;

public class Verify {
	public static boolean VerifyUserID(int id){
		if (id<1) {
			return false;
		}
		return true;
	}
	
	public static boolean VerifyPassword(String password){
		if (password.trim().length()<1 || password.trim().length()>8) {
			return false;
		}
		return true;
	}
	
	public static boolean VerifyUserName(String name){
		if (name.trim().length()<3||name.trim().length()>10) {
			return false;
		}
		return true;
	}
	
	public static boolean VerifyUserSex(String sex){
		if (sex.trim().length()!=0||sex.equals("m")||sex.equals("f")) {
			return false;
		}
		return true;
	}
	
	public static boolean VerifyUserAge(int age){
		if (age<18||age>100) {
			return false;
		}
		return true;
	}
	
	public static boolean VerifyUserPhoneNumber(String phonenumber){
		if (phonenumber.length()<8||phonenumber.length()>20) {
			return false;
		}
		return true;
	}
	
	
}
